<?php $this->fetch('public/head') ?>
<div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">客户列表</li>
            <li class=""><a href="<?php echo url('add') ?>">添加客户</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th style="width: 30px;">排序</th>
                        <th>名称</th>
                        <th>状态</th>
                        <th>时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($list as $v): ?>
                    <tr>
                        <td><?php echo $v['id'] ?></td>
                        <td><?php echo $v['sort'] ?></td>
                        <td><?php echo $v['name'] ?></td>
                        <td>
							<?php if($v['isshow']==1): ?>
                            <a href="<?php echo url('flag?id='.$v['id']) ?>" data-param="isshow=0" class="layui-btn layui-btn-xs ajax-post">显示</a>
                            <?php else: ?>
                            <a href="<?php echo url('flag?id='.$v['id']) ?>" data-param="isshow=1" class="layui-btn layui-btn-danger layui-btn-xs ajax-post">隐藏</a>
                            <?php endif; ?>
                        </td>
                        <td><?php echo $v['add_time'] ?></td>
                        <td>
                            <a href="<?php echo url('edit?id='.$v['id']) ?>" class="layui-btn layui-btn-normal layui-btn-xs">编辑</a>
                            <a href="<?php echo url('delete?id='.$v['id']) ?>" class="layui-btn layui-btn-danger layui-btn-xs ajax-delete">删除</a>
                        </td>
                    </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $this->fetch('public/script') ?>